package com.wjh.service.impl;

import com.wjh.api.service.OrderService;
import com.wjh.base.BaseController;
import com.wjh.bean.Result;
import com.wjh.dao.OrderDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 王金海
 * @Description:
 * @Date: Created by Administrator on 2018/6/28.
 * @Modified By:
 */
@RestController
public class OrderServiceImpl extends BaseController implements OrderService {


    @Autowired
    private OrderDao orderDao;

    @Override
    public Result updateOrderIdInfo(@RequestParam("isPay") Long isPay, @RequestParam("payId") String aliPayId,
                                    @RequestParam("orderNumber") String orderNumber) {
        int updateOrder = orderDao.updateOrder(isPay, aliPayId, orderNumber);
        if (updateOrder <= 0) {
            return error("系统错误!");
        }
        return success();

    }
}
